<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<%@include file="/common/common.jspf"%>
<script type="text/javascript"
	src="${pageContext.request.contextPath}/js/warehouse/warehousestock_form_edit.js"></script>
<style type="text/css">
.col-sm-3 {
	width: 15%;
	float: left;
}

.col-sm-9 {
	width: 85%;
	float: left;
}

label[class^="btn btn-default"] {
	margin-top: -4px;
}
</style>
</head>
<body>
	<div class="l_err" style="width: 100%; margin-top: 2px;"></div>
	<form id="form" name="form" class="form-horizontal" method="post"
		action="${ctx}/warehousestock_form/warehousestock_form_editEntity.shtml">
		<input type="hidden" class="form-control checkacc"
			value="${stock.id}" name="warehouseStockFormMap.id" id="id">
		<section class="panel panel-default">
		<div class="panel-body">
			<div class="form-group">
				<label class="col-sm-3 control-label">序号</label>
				<div class="col-sm-9">
					<input type="text" class="form-control checkabh" readonly value="${stock.id}" />
				</div>
			</div>
			<div class="line line-dashed line-lg pull-in"></div>
			<div class="form-group">
				<label class="col-sm-3 control-label">物料编码</label>
				<div class="col-sm-9">
					<input type="text" class="form-control checkabh" readonly value="${stock.material_code}" />
				</div>
			</div>
			<div class="line line-dashed line-lg pull-in"></div>
			<div class="form-group">
				<label class="col-sm-3 control-label">名称</label>
				<div class="col-sm-9">
					<input type="text" class="form-control checkabh" readonly value="${stock.oname}" />
				</div>
			</div>
			<div class="line line-dashed line-lg pull-in"></div>
			<div class="form-group">
				<label class="col-sm-3 control-label">长</label>
				<div class="col-sm-9">
					<input type="text" class="form-control checkabh" readonly value="${stock.length}" />
				</div>
			</div>
			<div class="line line-dashed line-lg pull-in"></div>
			<div class="form-group">
				<label class="col-sm-3 control-label">宽</label>
				<div class="col-sm-9">
					<input type="text" class="form-control checkabh" readonly value="${stock.weight}" />
				</div>
			</div>
			<div class="line line-dashed line-lg pull-in"></div>
			<div class="form-group">
				<label class="col-sm-3 control-label">高</label>
				<div class="col-sm-9">
					<input type="text" class="form-control checkabh" readonly value="${stock.height}" />
				</div>
			</div>
			<div class="line line-dashed line-lg pull-in"></div>
			<div class="form-group">
				<label class="col-sm-3 control-label">单位</label>
				<div class="col-sm-9">
					<input type="text" class="form-control checkabh" readonly value="${stock.unit}" />
				</div>
			</div>
			<div class="line line-dashed line-lg pull-in"></div>
			<div class="form-group">
				<label class="col-sm-3 control-label">初期结存数量</label>
				<div class="col-sm-9">
					<input type="text" class="form-control checkabh" readonly value="${stock.initialNumber}" />
				</div>
			</div>
			<div class="line line-dashed line-lg pull-in"></div>
			<div class="form-group">
				<label class="col-sm-3 control-label">平均单价</label>
				<div class="col-sm-9">
					<input type="text" class="form-control checkabh" readonly value="${stock.initialPrice}" />
				</div>
			</div>
			<div class="line line-dashed line-lg pull-in"></div>
			<div class="form-group">
				<label class="col-sm-3 control-label">初期结存金额</label>
				<div class="col-sm-9">
					<input type="text" class="form-control checkabh" readonly value="${stock.initialMoney}" />
				</div>
			</div>
			<div class="line line-dashed line-lg pull-in"></div>
			<div class="form-group">
				<label class="col-sm-3 control-label">本期收入数量</label>
				<div class="col-sm-9">
					<input type="text" class="form-control checkabh" readonly value="${stock.currentInNumber}" />
				</div>
			</div>
			<div class="line line-dashed line-lg pull-in"></div>
			<div class="form-group">
				<label class="col-sm-3 control-label">平均单价</label>
				<div class="col-sm-9">
					<input type="text" class="form-control checkabh" readonly value="${stock.currentInPrice}" />
				</div>
			</div>
			<div class="line line-dashed line-lg pull-in"></div>
			<div class="form-group">
				<label class="col-sm-3 control-label">本期收入金额</label>
				<div class="col-sm-9">
					<input type="text" class="form-control checkabh" readonly value="${stock.currentInMoney}" />
				</div>
			</div>
			<div class="line line-dashed line-lg pull-in"></div>
			<div class="form-group">
				<label class="col-sm-3 control-label">本期发出数量</label>
				<div class="col-sm-9">
					<input type="text" class="form-control checkabh" readonly value="${stock.currentOutNumber}" />
				</div>
			</div>
			<div class="line line-dashed line-lg pull-in"></div>
			<div class="form-group">
				<label class="col-sm-3 control-label">平均单价</label>
				<div class="col-sm-9">
					<input type="text" class="form-control checkabh" readonly value="${stock.currentOutPrice}" />
				</div>
			</div>
			<div class="line line-dashed line-lg pull-in"></div>
			<div class="form-group">
				<label class="col-sm-3 control-label">本期发出金额</label>
				<div class="col-sm-9">
					<input type="text" class="form-control checkabh" readonly value="${stock.currentOutMoney}" />
				</div>
			</div>
			<div class="line line-dashed line-lg pull-in"></div>
			<div class="form-group">
				<label class="col-sm-3 control-label">末期结存数量</label>
				<div class="col-sm-9">
					<input type="text" class="form-control checkabh" readonly
						id="lastNumber" value="${stock.lastNumber}" />
				</div>
			</div>
			<div class="line line-dashed line-lg pull-in"></div>
			<div class="form-group">
				<label class="col-sm-3 control-label">平均单价</label>
				<div class="col-sm-9">
					<input type="text" class="form-control checkabh" readonly value="${stock.lastPrice}" />
				</div>
			</div>
			<div class="line line-dashed line-lg pull-in"></div>
			<div class="form-group">
				<label class="col-sm-3 control-label">末期结存金额</label>
				<div class="col-sm-9">
					<input type="text" class="form-control checkabh" readonly value="${stock.lastMoney}" />
				</div>
			</div>
			<div class="line line-dashed line-lg pull-in"></div>
			<div class="form-group">
				<label class="col-sm-3 control-label">盘点数</label>
				<div class="col-sm-9">
					<input type="number" class="form-control checkabh" id="checkNumber"
						 name="warehouseStockFormMap.checkNumber" value="${stock.checkNumber}" />
				</div>
			</div>
			<div class="line line-dashed line-lg pull-in"></div>
			<input type="hidden" id="profitAndLoss" name="warehouseStockFormMap.profitAndLoss"/>
		</div>
		<footer class="panel-footer text-right bg-light lter">
		<button type="submit" class="btn btn-success btn-s-xs">提交</button>
		</footer> </section>
	</form>
	<script type="text/javascript">
		$(function() {
			$("#checkNumber").change(function() {
				var lastNumber = $("#lastNumber").val();
				var checkNumber = $("#checkNumber").val();
				$("#profitAndLoss").val(lastNumber-checkNumber);
			});
		});
	</script>
</body>
</html>